<?php
/**
 * CreateTime: 2023/11/15 10:17
 * User:LinQ
 */
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('data_mapping', function (Blueprint $table) {
            // 数据库基本配置
            $table->engine = 'InnoDB';
            // 数据库字段
            $table->id('data_mapping_id')->comment("数据映射id");
            $table->integer('com_id')->nullable(false)->comment("用户所属公司id");
            $table->integer('parent_id')->nullable(false)->comment("父亲id");
            $table->string('value')->nullable(false)->comment("value");
            $table->string('key')->nullable(false)->comment("key");
            $table->string('code')->nullable(false)->comment("数据关键词");
            $table->string('status',50)->default(1)->nullable(false)->comment("是否删除 1是 2否 默认值为1");
            $table->integer('owner_id')->nullable(false)->comment("创建人ID");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
};
